<template>
    <bi-form @submit="save">
            <bi-card>
                <bi-form-item label="后台名称" >
                    <bi-input v-model="form.admin_title"/>
                </bi-form-item>
                <bi-form-item label="默认应用" >
                    <bi-select v-model="form.default_app" :option="$pageData.defaultAppOption"/>
                </bi-form-item>
                <template #footer>
                    <bi-button type="primary" submit   icon="fa-save" >保存</bi-button>
                </template>
            </bi-card>
        </bi-form>
</template>


<script>
export default{
    data(){

        let form = {
            admin_title:'',
            default_app:''
        }
        
        form = this.$assign(form,this.$pageData.system);
 
        return {
            loading:false,
            form,
        }
    },
    methods:{
        save(){
            this.$ajax({
                url:this.$url({action:'saveSystem'}),
                data:this.form,
                success:()=>{
                    this.$toast('保存成功');
                }
            });
        }
    }
}
</script>